<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"> 

<ui:composition template="/_pesquisar.xhtml">
	<ui:define name="corpo">

		<div id="conteudo">
			<h:form id="form">
			
			<h2>
					<h:outputText value="Documentos Cadastrados" />
				</h2>
							
				<p:dataTable id="listSetor" value="#{setorBean.setores}"  var="setor" 
					emptyMessage="Não Encontrado" paginator="true" rows="10" selectionMode="single" >

					<f:facet name="header">
						<h:outputText value="SETORES CADASTRADOS" />
					</f:facet>
					
					<p:column headerText="Setor" sortBy="#{setor.nome}" filterBy="#{setor.nome}" filterMatchMode="contains">
						<h:outputText value="#{setor.nome}" />
					</p:column>
					
					<p:column headerText="Orgão" sortBy="#{setor.orgao.nome}" filterBy="#{setor.orgao.nome}" filterMatchMode="contains">
						<h:outputText value="#{setor.orgao.nome}" />
					</p:column>
					
					<p:column headerText="Sigla" sortBy="#{setor.orgao.sigla}" filterBy="#{setor.orgao.sigla}" filterMatchMode="contains">
						<h:outputText value="#{setor.orgao.sigla}" />
					</p:column>
					
				</p:dataTable>	
									
			</h:form>
			
		</div>

	</ui:define>
</ui:composition>

</html>
